package com.caizongzhen.www.controller;

import com.caizongzhen.www.entity.User;
import com.caizongzhen.www.util.Assert;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
@Controller
public class DoctorConntroller {
    @RequestMapping("/doctor")
    public String findDoctor(Model model, HttpSession session) {
        if(Assert.isEmpty((User)session.getAttribute("loginUser"))) return "redirect:/index";
        return  "doctor";
    }
}
